Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: Reactjs Interview Questions
Description: React is a JavaScript-based UI development library. Facebook and an open-source developer community run it. Although React is a library rather than a language, it is widely used in web development. The library first appeared in May 2013 and is now one of the most commonly used frontend libraries for web development.in this notes i have done 300+ interview questions and answers so that is best for interview from my side

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


its arguments changes
� Back to Top
183
...
Redux Form can be used with raw
HTML5 inputs, but it also works very well with common UI frameworks
like Material UI, React Widgets and React Bootstrap
...

What are the main features of Redux Form?
Some of the main features of Redux Form are:
1
...

2
...

3
...

� Back to Top
185
...


91

For example, you can add redux-thunk and logger passing them as arguments to applyMiddleware():
import { createStore, applyMiddleware } from 'redux'
const createStoreWithMiddleware = applyMiddleware(ReduxThunk, logger)(createStore)
� Back to Top
186
...

How Relay is different from Redux?
Relay is similar to Redux in that they both use a single store
...
Relay caches the data for you and
optimizes data fetching for you, by fetching only changed data and nothing
more
...

What is an action in Redux?
Actions are plain JavaScript objects or payloads of information that send
data from your application to your store
...
Actions must have a type property that indicates
the type of action being performed
...

What is the difference between React Native and React?
React is a JavaScript library, supporting both front end web and being
run on the server, for building user interfaces and web applications
...

� Back to Top
189
...

You can run the app in your mobile using expo app (https://expo
...

� Back to Top
190
...
log, console
...
As of React Native v0
...


93

How to debug your React Native?
Follow the below steps to debug React Native app:
1
...

2
...

3
...

4
...

5
...


React supported libraries & Integration
� Back to Top
192
...
It was originally written to compute derived data from Redux-like
applications state, but it can’t be tied to any architecture or library
...
If the the same
inputs are provided twice ivalue = this
...
*/
}
render() {
let value = this
...
contextType = MyContext;
2
...


133

class MyClass extends React
...
context;
/* render something based on the value */
}
}
� Back to Top
280
...

It requires a function as a child which receives current context value as
argument and returns a react node
...

Lets take a simple example,
...
Consumer>
� Back to Top
281
...

For example, the code below will re-render all consumers every time the
Provider re-renders because a new object is always created for value
...
Component {
render() {
return (



);
}
}
This can be solved by lifting up the value to parent state,

134

class App extends React
...
state = {
value: {something: 'something'},
};
}
render() {
return (
...
value}>


);
}
}
� Back to Top
282
...
It is handled
differently by React just like key
...
In this case, you can use Forward Ref API
...
forwardRef API
...
Component {
componentDidUpdate(prevProps) {
console
...
log('new props:', this
...
rest} = this
...
rest} />;
}
}
return React
...
props} forwardedRef={ref} />;
});
}
Let’s use this HOC to log all props that get passed to our “fancy button”
component,
class FancyButton extends React
...

}
//
...
In this case,
you can set focus to button element
...
/FancyButton';
const ref = React
...
current
...

Is ref argument available for all functions or class components?
Regular function or class components don’t receive the ref argument, and
ref is not available in props either
...
forwardRef call
...

Why do you need additional care for component libraries while
using forward refs?
When you start using forwardRef in a component library, you should treat
it as a breaking change and release a new major version of your library
...
These changes can
break apps and other libraries that depend on the old behavior
...

How to create react class components without ES6?
If you don’t use ES6 then you may need to use the create-react-class
module instead
...

When do you need to use refs?
There are few use cases to go for refs,
1
...

2
...

3
...

� Back to Top
290
...
i
...
Lets take an example with the children prop for render props,
(

The mouse position is {mouse
...
y}


)}/>
Actually children prop doesn’t need to be named in the list of “attributes”
in JSX element
...
x}, {mouse
...

Mouse
...
func
...

What are the problems of using render props with pure components?
If you create a function inside a render method, it negates the purpose
of pure component
...
You can solve this issue by defining the
render function as instance method
...

How do you create HOC using render props?
You can implement most higher-order components (HOC) using a regular
component with a render prop
...

function withMouse(Component) {
return class extends React
...
this
...

� Back to Top
293
...
If your
application renders long lists of data then this technique is recommended
...

� Back to Top
294
...
If you still want to display them then you
need to convert it to string
...


� Back to Top
295
...
g
...

For example, dialogs, global message notifications, hovercards, and
tooltips
...

How do you set default value for uncontrolled component?
In React, the value attribute on form elements will override the value in
the DOM
...
To
handle this case, you can specify a defaultValue attribute instead of
value
...
handleSubmit}>